<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  
  
    <meta name="keywords" content="博客">
  
  
    <meta name="description" content="记录Vue3、Python学习笔记和实例技术分享">
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>Hexo 安装和部署简介 |  Hexo Cobra1966</title>
  <title>Hexo 安装和部署简介 |  Hexo Cobra1966</title>
  
    <link rel="apple-touch-icon" sizes="57x57" href="/images/icons/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/images/icons/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/images/icons/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/images/icons/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/images/icons/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/images/icons/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/images/icons/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/icons/apple-touch-icon-180x180.png">
    <link rel="apple-touch-icon" sizes="167x167" href="/images/icons/apple-touch-icon-167x167.png">
  
  
    <link rel="shortcut icon" href="/favicon.ico">
  
  
<link rel="stylesheet" href="/Hexo_blog/css/style.css">

<meta name="generator" content="Hexo 5.4.1"></head>

<body>
  <main class="main">
    
	<header class="header">

	<div class="container">
		<nav class="navbar d-flex justify-content-between align-items-center">
			<a class="brand" href="/Hexo_blog/">
				<img class="logo" src="/Hexo_blog/images/brand.svg" alt="Hexo Cobra1966" role="img">
			</a>
			<ul class="main-nav">
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/">首页</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/gallery">画廊</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/stories">案例</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/archives">新闻</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/about">关于</a>
  </li>
  
</ul>
		</nav>
		<a id="mobile-nav-toggle">
			<span class="mobile-nav-toggle-bar"></span>
			<span class="mobile-nav-toggle-bar"></span>
			<span class="mobile-nav-toggle-bar"></span>
		</a>
	</div>
</header>

    <section>
      <div class="container">
  <article id="post-Hexo-安装和部署简介" class="article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  
  
  <div class="artcle-cover mb-5">
    
  </div>
  
  <div class="article-inner">
    
    <header class="article-header">
      
      
  
    <h1 class="article-title" itemprop="name">
      Hexo 安装和部署简介
    </h1>
  

      <div class="article-meta">
        <time class="text-gray" datetime="2022-03-04T12:58:23.000Z" itemprop="datePublished">
  2022-03-04
</time>
        
      </div>
      
    </header>
    
    <div class="article-entry" itemprop="articleBody">
      <h2 id="1、Hexo的安装"><a href="#1、Hexo的安装" class="headerlink" title="1、Hexo的安装"></a>1、Hexo的安装</h2><h3 id="首先，在服务器端的基础安装"><a href="#首先，在服务器端的基础安装" class="headerlink" title="首先，在服务器端的基础安装"></a>首先，在服务器端的基础安装</h3><h4 id="①-安装Nginx"><a href="#①-安装Nginx" class="headerlink" title="① 安装Nginx"></a>① 安装Nginx</h4><p>Nginx 源码编译安装请参考：<a target="_blank" rel="noopener" href="https://www.jianshu.com/p/88f9ef3b80d4">Nginx源码编译安装</a></p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">1、&lt;!-- 在 <span class="attribute">Ubuntu</span> 系统下 --&gt;</span><br><span class="line"><span class="number">2</span>、先安装Nginx依赖包：</span><br><span class="line">$ apt-get install gcc</span><br><span class="line">$ apt-get install libpcre3 libpcre3-dev</span><br><span class="line">$ apt-get install zlib1g zlib1g-dev</span><br><span class="line">&lt;!-- Ubuntu14.<span class="number">04</span>的仓库中没有发现openssl-dev，由下面openssl和libssl-dev替代 --&gt;</span><br><span class="line">&lt;!-- apt-get install openssl openssl-dev --&gt;</span><br><span class="line">$ sudo apt-get install openssl </span><br><span class="line">$ sudo apt-get install libssl-dev</span><br><span class="line"></span><br><span class="line">&lt;!-- 直接安装 Nginx --&gt;</span><br><span class="line">$ sudo apt install nginx</span><br><span class="line"></span><br><span class="line">&lt;!-- 启动 Nginx --&gt;</span><br><span class="line">$ service nginx start</span><br><span class="line"></span><br><span class="line">&lt;!-- 配置 Nginx(/etc/nginx/nginx.conf)</span><br><span class="line"></span><br></pre></td></tr></table></figure>
    </div>
    <footer class="article-footer">
      
    </footer>
  </div>
  
  
    
<nav class="article-nav pt-4 mt-3" id="article-nav">
  
  
    <a href="/Hexo_blog/2022/03/03/pinia/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">后一篇</strong>
      <div class="article-nav-title">pinia 讲座</div>
    </a>
  
</nav>


  
</article>
</div>
    </section>
    <footer class="footer pt-5 mt-5">
  <div class="container">
    <div class="py-3">
      <div class="row justify-content-between">
        <div class="col-6">
          <img class="filter-gray mb-3" height="40" src="/Hexo_blog/images/brand.svg" alt="Hexo Cobra1966" role="img">
          <p class="mb-4">记录Vue3、Python学习笔记和实例技术分享</p>
          <ul class="list-inline">
            
          </ul>
        </div>
        <div class="col-4">
          <h5>友情链接</h5>
          <ul class="list-inline">
            
          </ul>
        </div>
      </div>
    </div>
    <hr class="hr" style="opacity: .25;">
    <div class="pt-3 pb-5">
      <ul class="list-inline mb-0 text-center">
        <li class="list-inline-item">&copy; 2022 Hexo Cobra1966</li>
        
        <li class="list-inline-item">Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></li>
        <li class="list-inline-item">Designer <a href="https://acorn.imaging.xin/" target="_blank">Snake1966</a></li>
      </ul>
    </div>
  </div>
</footer>
  </main>
  <div id="mobile-nav-dimmer"></div>
<div id="mobile-nav">
	<div id="mobile-nav-inner">
		<ul class="mobile-nav">
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/">首页</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/gallery">画廊</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/stories">案例</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/archives">新闻</a>
  </li>
  
    
  <li class="nav-item ">
    <a class="nav-item-link" href="/Hexo_blog/about">关于</a>
  </li>
  
</ul>
	</div>
</div>

  
<script src="//cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>


<script src="//cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.min.js"></script>


<script src="/Hexo_blog/js/script.js"></script>


<script src="/Hexo_blog/js/mobile-nav.js"></script>

</body>
</html>